<?php 
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
echo $this->render('_centernav');?>
<?php if($friend_num != 0){?>
我的好友：（<?php echo $friend_num;?>）
   	<?php foreach($friends as $k=>$v){?>
			<p><img src="http://files.bwphp.com/<?php echo $v['user_thumb']?>" alt="" height='80px' width='150px' class='huanxin'>
			<?php echo $v['user_name']?></p>
	<?php }?>

<?php }else{
	echo "<center><h1>你当前没有好友</h1></center>";
}?>
<script>
	$('.huanxin').dblclick(function(){
		window.open("<?= Url::to(['center/chat'])?>"); 
	})
</script>